Skip to content

Add weekly TestFlight public-beta promotion#25712

Merged
jkmassel merged 2 commits into
trunkfrom
jkmassel/friday-testflight-promotion
Jun 30, 2026
Merged

Add weekly TestFlight public-beta promotion#25712
jkmassel merged 2 commits into
trunkfrom
jkmassel/friday-testflight-promotion

Conversation

@jkmassel

@jkmassel jkmassel commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the two beta-promotion tiers on top of the per-commit internal TestFlight builds (#25674), turning "release" into picking a build. Every promotion is a metadata-only App Store Connect call (distribute_only) — no rebuild.

per-commit  →  internal TestFlight
daily 00:00 →  last build of the day  →  Nightly Beta Testers   (automatic)
weekly      →  a developer picks a nightly  →  public beta        (human-chosen)
  • Daily (automatic)promote_nightly_build distributes the last processed build of the day to the Nightly Beta Testers group (WordPress + Jetpack).
  • Weekly (human-picked)gather_testflight_candidates lists the nightly builds in Slack and opens a Buildkite block step; promote_build ships the chosen build to public beta.

How it works

  • Candidates come from App Store Connect, not reconstructed build codes — each carries its real marketing version, and the weekly list reads the Nightly Beta Testers group's members.
  • Scoping — highest marketing version present (public beta tracks the latest line) → last 7 days → newest-first, enriched with the commit/PR from the matching Buildkite build.
  • The pick — Slack presents the list and links to the block step's unblock dialog; the selection happens in Buildkite (block-step fields can't be submitted from Slack). WordPress and Jetpack share a build code, so one pick promotes both.

Safety

All three lanes run only on trunk (the scheduled branch) — on any other branch, or locally, they fail immediately and touch nothing. An off-trunk promotion is a mistake; the guard is a backstop, since the schedules only run on trunk anyway.

Not in this PR

  • Buildkite schedules (managed in Terraform) — daily and weekly, both on trunk. Setup is documented in docs/testflight-promotion.md.
  • Richer "what's new" from the PRs since the last public build — currently a minimal placeholder.
  • Reader stays excluded (archive broken since Move PostHelper to app target #25321).

Testing

Validated end-to-end on CI via temporary branch-gated steps (since removed):

  • Real nightly promotion → Nightly Beta Testers for WordPress + Jetpack (#32892)
  • Weekly gather reads the nightly group + opens the block-step picker; empty group → "nothing to promote" (#32896, #32888)
  • Latest-line + 7-day scoping and the trunk gate — standalone logic tests
  • Create the daily + weekly Buildkite schedules
  • First real public promotion from trunk

@dangermattic

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot

wpmobilebot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number32926
VersionPR #25712
Bundle IDorg.wordpress.alpha
Commit94013dd
Installation URL3h467tcq0skg0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number32926
VersionPR #25712
Bundle IDcom.jetpack.alpha
Commit94013dd
Installation URL15u36o3dd3aeo
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@jkmassel jkmassel force-pushed the jkmassel/friday-testflight-promotion branch 8 times, most recently from 0f7c509 to f7b8306 Compare June 29, 2026 03:02
@jkmassel jkmassel requested a review from oguzkocer June 29, 2026 15:38
@jkmassel jkmassel self-assigned this Jun 29, 2026
Promote the last processed build of the day to the Nightly Beta Testers group
for WordPress and Jetpack — a metadata-only App Store Connect call, no rebuild.
Runs automatically on a daily schedule (`promote_nightly_build` lane +
.buildkite/promote-nightly.yml). Distributes for real only on trunk (the
scheduled branch); anywhere else it's a dry run.
@jkmassel jkmassel force-pushed the jkmassel/friday-testflight-promotion branch from f7b8306 to a5ed744 Compare June 29, 2026 16:02
List the nightly-group builds in Slack and let a developer pick one from a
Buildkite block step, then promote it to public beta (gather_testflight_candidates
+ promote_build lanes + .buildkite/promote-testflight.yml). Candidates are scoped
to the latest marketing line and the last 7 days, newest first, and the Slack
message links straight to the block step's unblock dialog.
@jkmassel jkmassel force-pushed the jkmassel/friday-testflight-promotion branch from a5ed744 to 94013dd Compare June 29, 2026 17:33
@jkmassel jkmassel added the Tooling Build, Release, and Validation Tools label Jun 29, 2026
@jkmassel jkmassel added this to the 27.1 milestone Jun 29, 2026
@jkmassel jkmassel marked this pull request as ready for review June 29, 2026 17:39
@jkmassel jkmassel requested a review from a team as a code owner June 29, 2026 17:39

@oguzkocer oguzkocer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me :shipit:

I did wonder a little bit about these cases, but they seem to be covered:

  1. What happens to the nightly build if there are no new builds in trunk (succeeds silently by not promoting anything)
  2. What happens if a previously promoted build becomes a candidate for the next day (seems unlikely and safe with the current values)
  3. Can we ever accidentally promote an older build than that's already promoted, especially in nightly? (since the builds are ordered by newest, doesn't seem to be possible)

Similar to most everything in fastlane, there are parts that feel slightly flimsy - as in the might break if we change this value and that at the same time stuff - but that's just the nature of these lanes and as far as I can tell, nothing truly worrisome could ever happen. So, I think we ship this and iteratively improve it if and when we find any edge cases.

# under `set -e` aborts before fastlane runs and bypasses that rescue. A build-level failure
# notification ensures a broken unattended nightly run still reaches the channel.
notify:
- slack: "#build-and-ship"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been thinking about this on the Android end and I wonder if we should use one of our team's channels for it.

#build-and-ship is very noisy, so it'd be more likely for these failures to go unnoticed. Also, any issues would be addressed by our team and not infra folks - well, most of the time anyway - so, I was thinking either to use a team specific channel, or keep using #build-and-ship, but in the failure message ping our team. The second option would allow keeping that channel muted and still get a heads up. What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figure we can adjust this later as it's an operational concern – right now we put most of the release chatter in #build-and-ship so I figured we'd mirror that to start and can figure out something else later if needed 🤷

@jkmassel jkmassel added this pull request to the merge queue Jun 30, 2026
Merged via the queue into trunk with commit 6b3af7d Jun 30, 2026
26 checks passed
@jkmassel jkmassel deleted the jkmassel/friday-testflight-promotion branch June 30, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tooling Build, Release, and Validation Tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants